package com.supreme.stockserver.feignapi;

import com.supreme.common.dto.UpdateGoodsStockDTO;
import com.supreme.stockserver.service.StockService;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping(value = "stock_feign")
public class StockFeignApi {

    @Resource
    private StockService stockService;

    @PutMapping(value = "stocks")
    public Integer updateGoodsStock(@RequestBody UpdateGoodsStockDTO updateGoodsStockDTO) {
        return stockService.updateGoodsStock(updateGoodsStockDTO);
    }
}
